Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t85.c
- --
- #define F_CPU 1000000UL
- #include <avr/io.h>
- #include <util/delay.h>
- void delay_ms(uint16_t count) {
- while(count--) {
- _delay_ms(1);
- }
- }
- int main(void)
- {
- DDRB |= (1<<PB4); /* PORTB output 0b00010000 */
- while (1)
- {
- PORTB ^= (1<<PB4);
- delay_ms(500);
- }
- }
- ######################################
- make output
- ---
- pi@tumor:~/t85 $ make
- -------- begin --------
- avr-gcc (GCC) 4.9.2
- Copyright (C) 2014 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Compiling C: t85.c
- avr-gcc -c -mmcu=attiny85 -I. -gdwarf-2 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./t85.lst -std=gnu99 -MMD -MP -MF .dep/t85.o.d t85.c -o t85.o
- Linking: t85.elf
- avr-gcc -mmcu=attiny85 -I. -gdwarf-2 -DF_CPU=1000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=t85.o -std=gnu99 -MMD -MP -MF .dep/t85.elf.d t85.o --output t85.elf -Wl,-Map=t85.map,--cref -lm
- Creating load file for Flash: t85.hex
- avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature t85.elf t85.hex
- Creating load file for EEPROM: t85.eep
- avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
- --change-section-lma .eeprom=0 --no-change-warnings -O ihex t85.elf t85.eep || exit 0
- Creating Extended Listing: t85.lss
- avr-objdump -h -S -z t85.elf > t85.lss
- Creating Symbol Table: t85.sym
- avr-nm -n t85.elf > t85.sym
- Size after:
- AVR Memory Usage
- ----------------
- Device: attiny85
- Program: 92 bytes (1.1% Full)
- (.text + .data + .bootloader)
- Data: 0 bytes (0.0% Full)
- (.data + .bss + .noinit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement